Skip to content

fix(react): duplicate page transitions do not happen on react 18 - #25798

Merged
liamdebeasi merged 4 commits into
mainfrom
FW-2081
Aug 23, 2022
Merged

fix(react): duplicate page transitions do not happen on react 18#25798
liamdebeasi merged 4 commits into
mainfrom
FW-2081

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Aug 22, 2022

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: resolves #25797

What is the new behavior?

  • If we are mounting an IonPage element on a view that already has a reference to the element, do not fire a new page transition. This ensures that only the initial IonPage registration causes a transition.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 6.2.4-dev.11661268305.10458734

Manually verified that this is fixed on React 18 and does not regress the list starter app on React 17.

@github-actions github-actions Bot added the package: react @ionic/react package label Aug 22, 2022
@liamdebeasi
liamdebeasi marked this pull request as ready for review August 22, 2022 18:24
@liamdebeasi
liamdebeasi requested a review from a team August 22, 2022 18:24
Comment thread packages/react-router/src/ReactRouter/StackManager.tsx

@sean-perkins sean-perkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: react 18 with createRoot causes duplicate page transitions

3 participants